import Vue from 'vue'
import store from '@/store'
import SysEnum from '@/utils/sysEnum'
//todo 请求枚举数据
// import { getDicts as getDicts } from '@/api/system/dict/data'

function searchDictByKey(dict, key) {
  if (key == null && key == "") {
    return null
  }
  try {
    for (let i = 0; i < dict.length; i++) {
      if (dict[i].key == key) {
        return dict[i].value
      }
    }
  } catch (e) {
    return null
  }
}

function install() {
  Vue.use(SysEnum, {})
}

export default {
  install,
}
